const express = require('express')
// 创建路由对象
const router = express.Router()

// 导入用户路由处理函数模块
const dynastyHandler = require('../../router_handler/dynasty')

// 获取全部朝代信息
router.get('/dynasty/getDynasty', dynastyHandler.getDynasty)

// 添加朝代
router.post('/dynasty/addDynasty', dynastyHandler.addDynasty)

// 根据名称删除朝代信息
router.post('/dynasty/deleteDynastyByName', dynastyHandler.deleteDynastyByName)

// 根据名称查找朝代信息
router.post('/dynasty/searchDynastyByName', dynastyHandler.searchDynastyByName)

// 根据朝代id查找朝代信息
router.post('/dynasty/searchDynastyByDid', dynastyHandler.searchDynastyByDid)

// 将路由对象共享出去
module.exports = router
